<?php
class customException extends Exception {
    
    public  $message;
    public  $code;
    public  $previous;
    
    public function __construct($e) {
        $this->message = $e->getMessage();
        $this->code = $e->getCode();
        $this->previous = $e->getPrevious();
        parent::__construct($this->message, $this->code, $this->previous);
        $this->doException();
    }
    
    private function doException() {
        $this->doLog();
        //TODO - Create an exception level
        die($this->message);
    }
    
    private function doLog() {
        //TODO - Log to file
    }
}
?>